drop table if exists jms_dm.dm_waybill_unbagging_weight_sum_dt;
create external table if not exists jms_dm.dm_waybill_unbagging_weight_sum_dt(
     scan_site_code              string comment '扫描站点code'
    ,scan_site_name              string comment '扫描站点名称'
    ,pick_agent_code             string comment '揽收代理区code'
    ,pick_agent_name             string comment '揽收代理区名称'
    ,pick_network_code           string comment '揽收网点code'
    ,pick_network_name           string comment '揽收网点名称'
    ,scan_date                   string comment '扫描日期'
    ,weight_range1_cnt           bigint comment '重量区间1未建包票量(0<W≤1KG)'
    ,weight_range2_cnt           bigint comment '重量区间2未建包票量(1<W≤2KG)'
    ,weight_range3_cnt           bigint comment '重量区间3未建包票量(2<W≤3KG)'
    ,weight_range4_cnt           bigint comment '重量区间4未建包票量(3<W≤3.2KG)'
) comment '未建包运单重量段汇总'
partitioned by (dt string comment '分区日期')
stored as parquet
location '/dw/hive/jms_dm.db/external/dm_waybill_unbagging_weight_sum_dt'
tblproperties (
    'discover.partitions'='false',
    'parquet.column.index.access'='true'
);
